package com.weic.test01;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import com.weic.test01.dao.EmpDao;
import com.weic.test01.vo.User;
import javafx.application.Application;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test01 {

    @Test
    public void testSpring(){
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
//        EmpDao empDao = context.getBean("empDao", EmpDao.class);
//        empDao.addEmp();
//        User user = context.getBean("user", User.class);
//        System.out.println(user);
//        User user2 = context.getBean("user2", User.class);
//        System.out.println(user2);
        User user = context.getBean("user", User.class);
        System.out.println(user);
    }
}
